#!bin/bash 


if [ -n "$1" ]; then
    data_date=$1
else
    data_date=`date -d '-1 day' +%F`
    
fi

{
  "job": {
    "setting": {
      "speed": {
        "channel": 1
      },
      "errorLimit": {
        "record": 0,
        "percentage": 0.02
      }
    },
    "content": [
      {
        "reader": {
          "name": "mysqlreader",
          "parameter": {
            "username": "yRjwDFuoPKlqya9h9H2Amg==",
            "password": "XCYVpFosvZBBWobFzmLWvA==",
            "column": [
              "`order_id`",
              "`user_id`",
              "`address_id`",
              "`order_time`",
              "`pay_time`",
              "`total_amount`",
              "`discount_amount`",
              "`actual_amount`",
              "`payment_type`",
              "`delivery_type`",
              "`delivery_fee`",
              "`is_member`",
              "`member_discount`",
              "`coupon_id`",
              "`order_status`",
              "`cancel_reason`",
              "`cancel_time`",
              "`promise_time`",
              "`delivery_time`",
              "`remark`"
            ],
            "where": "1=1",
            "splitPk": "",
            "connection": [
              {
                "table": [
                  "me_order_info"
                ],
                "jdbcUrl": [
                  "jdbc:mysql://node101:3306/jtp_dingdong"
                ]
              }
            ]
          }
        },
        "writer": {
          "name": "hdfswriter",
          "parameter": {
            "defaultFS": "hdfs://node101:8020",
            "fileType": "orc",
            "path": "/user/hive/warehouse/jtp_dingdong/me_order_info/dt=${data_date}",
            "fileName": "me_order_info",
            "writeMode": "truncate",
            "fieldDelimiter": ",",
            "column": [
              {
                "name": "order_id",
                "type": "string"
              },
              {
                "name": "user_id",
                "type": "string"
              },
              {
                "name": "address_id",
                "type": "string"
              },
              {
                "name": "order_time",
                "type": "string"
              },
              {
                "name": "pay_time",
                "type": "string"
              },
              {
                "name": "total_amount",
                "type": "double"
              },
              {
                "name": "discount_amount",
                "type": "double"
              },
              {
                "name": "actual_amount",
                "type": "double"
              },
              {
                "name": "payment_type",
                "type": "int"
              },
              {
                "name": "delivery_type",
                "type": "int"
              },
              {
                "name": "delivery_fee",
                "type": "double"
              },
              {
                "name": "is_member",
                "type": "int"
              },
              {
                "name": "member_discount",
                "type": "double"
              },
              {
                "name": "coupon_id",
                "type": "string"
              },
              {
                "name": "order_status",
                "type": "int"
              },
              {
                "name": "cancel_reason",
                "type": "string"
              },
              {
                "name": "cancel_time",
                "type": "string"
              },
              {
                "name": "promise_time",
                "type": "string"
              },
              {
                "name": "delivery_time",
                "type": "string"
              },
              {
                "name": "remark",
                "type": "string"
              }
            ]
          }
        }
      }
    ]
  }
}
{
  "job": {
    "setting": {
      "speed": {
        "channel": 1
      },
      "errorLimit": {
        "record": 0,
        "percentage": 0.02
      }
    },
    "content": [
      {
        "reader": {
          "name": "mysqlreader",
          "parameter": {
            "username": "yRjwDFuoPKlqya9h9H2Amg==",
            "password": "XCYVpFosvZBBWobFzmLWvA==",
            "column": [
              "`order_id`",
              "`product_id`",
              "`sku_id`",
              "`category_id`",
              "`category_name`",
              "`product_name`",
              "`quantity`",
              "`price`",
              "`original_price`",
              "`discount_amount`",
              "`actual_amount`",
              "`weight`",
              "`is_gift`",
              "`refund_status`",
              "`refund_amount`",
              "`refund_time`"
            ],
            "where": "1=1",
            "splitPk": "",
            "connection": [
              {
                "table": [
                  "me_order_detail"
                ],
                "jdbcUrl": [
                  "jdbc:mysql://node101:3306/jtp_dingdong"
                ]
              }
            ]
          }
        },
        "writer": {
          "name": "hdfswriter",
          "parameter": {
            "defaultFS": "hdfs://node101:8020",
            "fileType": "orc",
            "path": "/user/hive/warehouse/jtp_dingdong/me_order_detail/dt=${data_date}",
            "fileName": "me_order_detail",
            "writeMode": "truncate",
            "fieldDelimiter": ",",
            "column": [
              {
                "name": "order_id",
                "type": "string"
              },
              {
                "name": "product_id",
                "type": "string"
              },
              {
                "name": "sku_id",
                "type": "string"
              },
              {
                "name": "category_id",
                "type": "string"
              },
              {
                "name": "category_name",
                "type": "string"
              },
              {
                "name": "product_name",
                "type": "string"
              },
              {
                "name": "quantity",
                "type": "int"
              },
              {
                "name": "price",
                "type": "double"
              },
              {
                "name": "original_price",
                "type": "double"
              },
              {
                "name": "discount_amount",
                "type": "double"
              },
              {
                "name": "actual_amount",
                "type": "double"
              },
              {
                "name": "weight",
                "type": "double"
              },
              {
                "name": "is_gift",
                "type": "int"
              },
              {
                "name": "refund_status",
                "type": "int"
              },
              {
                "name": "refund_amount",
                "type": "double"
              },
              {
                "name": "refund_time",
                "type": "string"
              }
            ]
          }
        }
      }
    ]
  }
}
{
  "job": {
    "setting": {
      "speed": {
        "channel": 1
      },
      "errorLimit": {
        "record": 0,
        "percentage": 0.02
      }
    },
    "content": [
      {
        "reader": {
          "name": "mysqlreader",
          "parameter": {
            "username": "yRjwDFuoPKlqya9h9H2Amg==",
            "password": "XCYVpFosvZBBWobFzmLWvA==",
            "column": [
              "`warehouse_id`",
              "`warehouse_name`",
              "`warehouse_type`",
              "`province`",
              "`city`",
              "`district`",
              "`address`",
              "`contact_phone`",
              "`manager_id`",
              "`manager_name`",
              "`area_size`",
              "`storage_capacity`",
              "`status`",
              "`open_time`",
              "`dw_create_time`",
              "`dw_update_time`"
            ],
            "where": "1=1",
            "splitPk": "",
            "connection": [
              {
                "table": [
                  "me_warehouse_info"
                ],
                "jdbcUrl": [
                  "jdbc:mysql://node101:3306/jtp_dingdong"
                ]
              }
            ]
          }
        },
        "writer": {
          "name": "hdfswriter",
          "parameter": {
            "defaultFS": "hdfs://node101:8020",
            "fileType": "orc",
            "path": "/user/hive/warehouse/jtp_dingdong/me_warehouse_info/dt=${data_date}",
            "fileName": "me_warehouse_info",
            "writeMode": "truncate",
            "fieldDelimiter": ",",
            "column": [
              {
                "name": "warehouse_id",
                "type": "string"
              },
              {
                "name": "warehouse_name",
                "type": "string"
              },
              {
                "name": "warehouse_type",
                "type": "int"
              },
              {
                "name": "province",
                "type": "string"
              },
              {
                "name": "city",
                "type": "string"
              },
              {
                "name": "district",
                "type": "string"
              },
              {
                "name": "address",
                "type": "string"
              },
              {
                "name": "contact_phone",
                "type": "string"
              },
              {
                "name": "manager_id",
                "type": "string"
              },
              {
                "name": "manager_name",
                "type": "string"
              },
              {
                "name": "area_size",
                "type": "double"
              },
              {
                "name": "storage_capacity",
                "type": "double"
              },
              {
                "name": "status",
                "type": "int"
              },
              {
                "name": "open_time",
                "type": "string"
              },
              {
                "name": "dw_create_time",
                "type": "string"
              },
              {
                "name": "dw_update_time",
                "type": "string"
              }
            ]
          }
        }
      }
    ]
  }
}
{
  "job": {
    "setting": {
      "speed": {
        "channel": 1
      },
      "errorLimit": {
        "record": 0,
        "percentage": 0.02
      }
    },
    "content": [
      {
        "reader": {
          "name": "mysqlreader",
          "parameter": {
            "username": "yRjwDFuoPKlqya9h9H2Amg==",
            "password": "XCYVpFosvZBBWobFzmLWvA==",
            "column": [
              "`user_id`",
              "`username`",
              "`gender`",
              "`birthday`",
              "`register_time`",
              "`register_channel`",
              "`register_device`",
              "`is_member`",
              "`member_level`",
              "`member_start_time`",
              "`member_expire_time`",
              "`phone`",
              "`email`",
              "`province`",
              "`city`",
              "`district`",
              "`address`",
              "`zip_code`",
              "`last_login_time`",
              "`status`",
              "`dw_create_time`",
              "`dw_update_time`"
            ],
            "where": "1=1",
            "splitPk": "",
            "connection": [
              {
                "table": [
                  "me_user_info"
                ],
                "jdbcUrl": [
                  "jdbc:mysql://node101:3306/jtp_dingdong"
                ]
              }
            ]
          }
        },
        "writer": {
          "name": "hdfswriter",
          "parameter": {
            "defaultFS": "hdfs://node101:8020",
            "fileType": "orc",
            "path": "/user/hive/warehouse/jtp_dingdong/me_user_info/dt=${data_date}",
            "fileName": "me_user_info",
            "writeMode": "truncate",
            "fieldDelimiter": ",",
            "column": [
              {
                "name": "user_id",
                "type": "string"
              },
              {
                "name": "username",
                "type": "string"
              },
              {
                "name": "gender",
                "type": "int"
              },
              {
                "name": "birthday",
                "type": "string"
              },
              {
                "name": "register_time",
                "type": "string"
              },
              {
                "name": "register_channel",
                "type": "int"
              },
              {
                "name": "register_device",
                "type": "int"
              },
              {
                "name": "is_member",
                "type": "int"
              },
              {
                "name": "member_level",
                "type": "int"
              },
              {
                "name": "member_start_time",
                "type": "string"
              },
              {
                "name": "member_expire_time",
                "type": "string"
              },
              {
                "name": "phone",
                "type": "string"
              },
              {
                "name": "email",
                "type": "string"
              },
              {
                "name": "province",
                "type": "string"
              },
              {
                "name": "city",
                "type": "string"
              },
              {
                "name": "district",
                "type": "string"
              },
              {
                "name": "address",
                "type": "string"
              },
              {
                "name": "zip_code",
                "type": "string"
              },
              {
                "name": "last_login_time",
                "type": "string"
              },
              {
                "name": "status",
                "type": "int"
              },
              {
                "name": "dw_create_time",
                "type": "string"
              },
              {
                "name": "dw_update_time",
                "type": "string"
              }
            ]
          }
        }
      }
    ]
  }
}
{
  "job": {
    "setting": {
      "speed": {
        "channel": 1
      },
      "errorLimit": {
        "record": 0,
        "percentage": 0.02
      }
    },
    "content": [
      {
        "reader": {
          "name": "mysqlreader",
          "parameter": {
            "username": "yRjwDFuoPKlqya9h9H2Amg==",
            "password": "XCYVpFosvZBBWobFzmLWvA==",
            "column": [
              "`user_id`",
              "`session_id`",
              "`behavior_time`",
              "`behavior_type`",
              "`product_id`",
              "`sku_id`",
              "`category_id`",
              "`page_url`",
              "`stay_duration`",
              "`is_new_user`",
              "`device_type`",
              "`ip`",
              "`province`",
              "`city`"
            ],
            "where": "1=1",
            "splitPk": "",
            "connection": [
              {
                "table": [
                  "me_user_behavior"
                ],
                "jdbcUrl": [
                  "jdbc:mysql://node101:3306/jtp_dingdong"
                ]
              }
            ]
          }
        },
        "writer": {
          "name": "hdfswriter",
          "parameter": {
            "defaultFS": "hdfs://node101:8020",
            "fileType": "orc",
            "path": "/user/hive/warehouse/jtp_dingdong/me_user_behavior/dt=${data_date}",
            "fileName": "me_user_behavior",
            "writeMode": "truncate",
            "fieldDelimiter": ",",
            "column": [
              {
                "name": "user_id",
                "type": "string"
              },
              {
                "name": "session_id",
                "type": "string"
              },
              {
                "name": "behavior_time",
                "type": "string"
              },
              {
                "name": "behavior_type",
                "type": "int"
              },
              {
                "name": "product_id",
                "type": "string"
              },
              {
                "name": "sku_id",
                "type": "string"
              },
              {
                "name": "category_id",
                "type": "string"
              },
              {
                "name": "page_url",
                "type": "string"
              },
              {
                "name": "stay_duration",
                "type": "int"
              },
              {
                "name": "is_new_user",
                "type": "int"
              },
              {
                "name": "device_type",
                "type": "int"
              },
              {
                "name": "ip",
                "type": "string"
              },
              {
                "name": "province",
                "type": "string"
              },
              {
                "name": "city",
                "type": "string"
              }
            ]
          }
        }
      }
    ]
  }
}
{
  "job": {
    "setting": {
      "speed": {
        "channel": 1
      },
      "errorLimit": {
        "record": 0,
        "percentage": 0.02
      }
    },
    "content": [
      {
        "reader": {
          "name": "mysqlreader",
          "parameter": {
            "username": "yRjwDFuoPKlqya9h9H2Amg==",
            "password": "XCYVpFosvZBBWobFzmLWvA==",
            "column": [
              "`rider_id`",
              "`rider_name`",
              "`gender`",
              "`phone`",
              "`id_card`",
              "`warehouse_id`",
              "`warehouse_name`",
              "`join_time`",
              "`rider_level`",
              "`vehicle_type`",
              "`vehicle_number`",
              "`status`",
              "`avg_rating`",
              "`total_orders`",
              "`dw_create_time`",
              "`dw_update_time`"
            ],
            "where": "1=1",
            "splitPk": "",
            "connection": [
              {
                "table": [
                  "me_rider_info"
                ],
                "jdbcUrl": [
                  "jdbc:mysql://node101:3306/jtp_dingdong"
                ]
              }
            ]
          }
        },
        "writer": {
          "name": "hdfswriter",
          "parameter": {
            "defaultFS": "hdfs://node101:8020",
            "fileType": "orc",
            "path": "/user/hive/warehouse/jtp_dingdong/me_rider_info/dt=${data_date}",
            "fileName": "me_rider_info",
            "writeMode": "truncate",
            "fieldDelimiter": ",",
            "column": [
              {
                "name": "rider_id",
                "type": "string"
              },
              {
                "name": "rider_name",
                "type": "string"
              },
              {
                "name": "gender",
                "type": "int"
              },
              {
                "name": "phone",
                "type": "string"
              },
              {
                "name": "id_card",
                "type": "string"
              },
              {
                "name": "warehouse_id",
                "type": "string"
              },
              {
                "name": "warehouse_name",
                "type": "string"
              },
              {
                "name": "join_time",
                "type": "string"
              },
              {
                "name": "rider_level",
                "type": "int"
              },
              {
                "name": "vehicle_type",
                "type": "int"
              },
              {
                "name": "vehicle_number",
                "type": "string"
              },
              {
                "name": "status",
                "type": "int"
              },
              {
                "name": "avg_rating",
                "type": "double"
              },
              {
                "name": "total_orders",
                "type": "int"
              },
              {
                "name": "dw_create_time",
                "type": "string"
              },
              {
                "name": "dw_update_time",
                "type": "string"
              }
            ]
          }
        }
      }
    ]
  }
}
{
  "job": {
    "setting": {
      "speed": {
        "channel": 1
      },
      "errorLimit": {
        "record": 0,
        "percentage": 0.02
      }
    },
    "content": [
      {
        "reader": {
          "name": "mysqlreader",
          "parameter": {
            "username": "yRjwDFuoPKlqya9h9H2Amg==",
            "password": "XCYVpFosvZBBWobFzmLWvA==",
            "column": [
              "`region_id`",
              "`region_name`",
              "`parent_id`",
              "`level`",
              "`is_leaf`",
              "`longitude`",
              "`latitude`",
              "`city_code`",
              "`zip_code`",
              "`status`",
              "`dw_create_time`",
              "`dw_update_time`"
            ],
            "where": "1=1",
            "splitPk": "",
            "connection": [
              {
                "table": [
                  "me_region_info"
                ],
                "jdbcUrl": [
                  "jdbc:mysql://node101:3306/jtp_dingdong"
                ]
              }
            ]
          }
        },
        "writer": {
          "name": "hdfswriter",
          "parameter": {
            "defaultFS": "hdfs://node101:8020",
            "fileType": "orc",
            "path": "/user/hive/warehouse/jtp_dingdong/me_region_info/dt=${data_date}",
            "fileName": "me_region_info",
            "writeMode": "truncate",
            "fieldDelimiter": ",",
            "column": [
              {
                "name": "region_id",
                "type": "string"
              },
              {
                "name": "region_name",
                "type": "string"
              },
              {
                "name": "parent_id",
                "type": "string"
              },
              {
                "name": "level",
                "type": "int"
              },
              {
                "name": "is_leaf",
                "type": "int"
              },
              {
                "name": "longitude",
                "type": "double"
              },
              {
                "name": "latitude",
                "type": "double"
              },
              {
                "name": "city_code",
                "type": "string"
              },
              {
                "name": "zip_code",
                "type": "string"
              },
              {
                "name": "status",
                "type": "int"
              },
              {
                "name": "dw_create_time",
                "type": "string"
              },
              {
                "name": "dw_update_time",
                "type": "string"
              }
            ]
          }
        }
      }
    ]
  }
}
{
  "job": {
    "setting": {
      "speed": {
        "channel": 1
      },
      "errorLimit": {
        "record": 0,
        "percentage": 0.02
      }
    },
    "content": [
      {
        "reader": {
          "name": "mysqlreader",
          "parameter": {
            "username": "yRjwDFuoPKlqya9h9H2Amg==",
            "password": "XCYVpFosvZBBWobFzmLWvA==",
            "column": [
              "`activity_id`",
              "`activity_name`",
              "`activity_type`",
              "`start_time`",
              "`end_time`",
              "`rule_desc`",
              "`target_user`",
              "`status`",
              "`budget`",
              "`creator_id`",
              "`creator_name`",
              "`channel`",
              "`dw_create_time`",
              "`dw_update_time`"
            ],
            "where": "1=1",
            "splitPk": "",
            "connection": [
              {
                "table": [
                  "me_promotion_info"
                ],
                "jdbcUrl": [
                  "jdbc:mysql://node101:3306/jtp_dingdong"
                ]
              }
            ]
          }
        },
        "writer": {
          "name": "hdfswriter",
          "parameter": {
            "defaultFS": "hdfs://node101:8020",
            "fileType": "orc",
            "path": "/user/hive/warehouse/jtp_dingdong/me_promotion_info/dt=${data_date}",
            "fileName": "me_promotion_info",
            "writeMode": "truncate",
            "fieldDelimiter": ",",
            "column": [
              {
                "name": "activity_id",
                "type": "string"
              },
              {
                "name": "activity_name",
                "type": "string"
              },
              {
                "name": "activity_type",
                "type": "int"
              },
              {
                "name": "start_time",
                "type": "string"
              },
              {
                "name": "end_time",
                "type": "string"
              },
              {
                "name": "rule_desc",
                "type": "string"
              },
              {
                "name": "target_user",
                "type": "int"
              },
              {
                "name": "status",
                "type": "int"
              },
              {
                "name": "budget",
                "type": "double"
              },
              {
                "name": "creator_id",
                "type": "string"
              },
              {
                "name": "creator_name",
                "type": "string"
              },
              {
                "name": "channel",
                "type": "int"
              },
              {
                "name": "dw_create_time",
                "type": "string"
              },
              {
                "name": "dw_update_time",
                "type": "string"
              }
            ]
          }
        }
      }
    ]
  }
}
{
  "job": {
    "setting": {
      "speed": {
        "channel": 1
      },
      "errorLimit": {
        "record": 0,
        "percentage": 0.02
      }
    },
    "content": [
      {
        "reader": {
          "name": "mysqlreader",
          "parameter": {
            "username": "yRjwDFuoPKlqya9h9H2Amg==",
            "password": "XCYVpFosvZBBWobFzmLWvA==",
            "column": [
              "`activity_id`",
              "`user_id`",
              "`order_id`",
              "`product_id`",
              "`participate_time`",
              "`activity_type`",
              "`discount_amount`",
              "`original_amount`",
              "`actual_amount`"
            ],
            "where": "1=1",
            "splitPk": "",
            "connection": [
              {
                "table": [
                  "me_promotion_activity"
                ],
                "jdbcUrl": [
                  "jdbc:mysql://node101:3306/jtp_dingdong"
                ]
              }
            ]
          }
        },
        "writer": {
          "name": "hdfswriter",
          "parameter": {
            "defaultFS": "hdfs://node101:8020",
            "fileType": "orc",
            "path": "/user/hive/warehouse/jtp_dingdong/me_promotion_activity/dt=${data_date}",
            "fileName": "me_promotion_activity",
            "writeMode": "truncate",
            "fieldDelimiter": ",",
            "column": [
              {
                "name": "activity_id",
                "type": "string"
              },
              {
                "name": "user_id",
                "type": "string"
              },
              {
                "name": "order_id",
                "type": "string"
              },
              {
                "name": "product_id",
                "type": "string"
              },
              {
                "name": "participate_time",
                "type": "string"
              },
              {
                "name": "activity_type",
                "type": "int"
              },
              {
                "name": "discount_amount",
                "type": "double"
              },
              {
                "name": "original_amount",
                "type": "double"
              },
              {
                "name": "actual_amount",
                "type": "double"
              }
            ]
          }
        }
      }
    ]
  }
}
{
  "job": {
    "setting": {
      "speed": {
        "channel": 1
      },
      "errorLimit": {
        "record": 0,
        "percentage": 0.02
      }
    },
    "content": [
      {
        "reader": {
          "name": "mysqlreader",
          "parameter": {
            "username": "yRjwDFuoPKlqya9h9H2Amg==",
            "password": "XCYVpFosvZBBWobFzmLWvA==",
            "column": [
              "`product_id`",
              "`sku_id`",
              "`product_name`",
              "`category_id`",
              "`category_name`",
              "`brand_id`",
              "`brand_name`",
              "`supplier_id`",
              "`supplier_name`",
              "`shelf_life`",
              "`storage_condition`",
              "`weight`",
              "`unit`",
              "`price`",
              "`original_price`",
              "`cost_price`",
              "`is_seasonal`",
              "`is_pre_sale`",
              "`is_limited`",
              "`status`",
              "`create_time`",
              "`update_time`",
              "`dw_create_time`",
              "`dw_update_time`"
            ],
            "where": "1=1",
            "splitPk": "",
            "connection": [
              {
                "table": [
                  "me_product_info"
                ],
                "jdbcUrl": [
                  "jdbc:mysql://node101:3306/jtp_dingdong"
                ]
              }
            ]
          }
        },
        "writer": {
          "name": "hdfswriter",
          "parameter": {
            "defaultFS": "hdfs://node101:8020",
            "fileType": "orc",
            "path": "/user/hive/warehouse/jtp_dingdong/me_product_info/dt=${data_date}",
            "fileName": "me_product_info",
            "writeMode": "truncate",
            "fieldDelimiter": ",",
            "column": [
              {
                "name": "product_id",
                "type": "string"
              },
              {
                "name": "sku_id",
                "type": "string"
              },
              {
                "name": "product_name",
                "type": "string"
              },
              {
                "name": "category_id",
                "type": "string"
              },
              {
                "name": "category_name",
                "type": "string"
              },
              {
                "name": "brand_id",
                "type": "string"
              },
              {
                "name": "brand_name",
                "type": "string"
              },
              {
                "name": "supplier_id",
                "type": "string"
              },
              {
                "name": "supplier_name",
                "type": "string"
              },
              {
                "name": "shelf_life",
                "type": "int"
              },
              {
                "name": "storage_condition",
                "type": "int"
              },
              {
                "name": "weight",
                "type": "double"
              },
              {
                "name": "unit",
                "type": "string"
              },
              {
                "name": "price",
                "type": "double"
              },
              {
                "name": "original_price",
                "type": "double"
              },
              {
                "name": "cost_price",
                "type": "double"
              },
              {
                "name": "is_seasonal",
                "type": "int"
              },
              {
                "name": "is_pre_sale",
                "type": "int"
              },
              {
                "name": "is_limited",
                "type": "int"
              },
              {
                "name": "status",
                "type": "int"
              },
              {
                "name": "create_time",
                "type": "string"
              },
              {
                "name": "update_time",
                "type": "string"
              },
              {
                "name": "dw_create_time",
                "type": "string"
              },
              {
                "name": "dw_update_time",
                "type": "string"
              }
            ]
          }
        }
      }
    ]
  }
}
{
  "job": {
    "setting": {
      "speed": {
        "channel": 1
      },
      "errorLimit": {
        "record": 0,
        "percentage": 0.02
      }
    },
    "content": [
      {
        "reader": {
          "name": "mysqlreader",
          "parameter": {
            "username": "yRjwDFuoPKlqya9h9H2Amg==",
            "password": "XCYVpFosvZBBWobFzmLWvA==",
            "column": [
              "`delivery_id`",
              "`order_id`",
              "`rider_id`",
              "`warehouse_id`",
              "`accept_time`",
              "`pickup_time`",
              "`delivery_start_time`",
              "`delivery_end_time`",
              "`delivery_distance`",
              "`delivery_duration`",
              "`delivery_status`",
              "`cancel_reason`",
              "`customer_score`",
              "`customer_feedback`"
            ],
            "where": "1=1",
            "splitPk": "",
            "connection": [
              {
                "table": [
                  "me_delivery_info"
                ],
                "jdbcUrl": [
                  "jdbc:mysql://node101:3306/jtp_dingdong"
                ]
              }
            ]
          }
        },
        "writer": {
          "name": "hdfswriter",
          "parameter": {
            "defaultFS": "hdfs://node101:8020",
            "fileType": "orc",
            "path": "/user/hive/warehouse/jtp_dingdong/me_delivery_info/dt=${data_date}",
            "fileName": "me_delivery_info",
            "writeMode": "truncate",
            "fieldDelimiter": ",",
            "column": [
              {
                "name": "delivery_id",
                "type": "string"
              },
              {
                "name": "order_id",
                "type": "string"
              },
              {
                "name": "rider_id",
                "type": "string"
              },
              {
                "name": "warehouse_id",
                "type": "string"
              },
              {
                "name": "accept_time",
                "type": "string"
              },
              {
                "name": "pickup_time",
                "type": "string"
              },
              {
                "name": "delivery_start_time",
                "type": "string"
              },
              {
                "name": "delivery_end_time",
                "type": "string"
              },
              {
                "name": "delivery_distance",
                "type": "double"
              },
              {
                "name": "delivery_duration",
                "type": "int"
              },
              {
                "name": "delivery_status",
                "type": "int"
              },
              {
                "name": "cancel_reason",
                "type": "string"
              },
              {
                "name": "customer_score",
                "type": "int"
              },
              {
                "name": "customer_feedback",
                "type": "string"
              }
            ]
          }
        }
      }
    ]
  }
}
{
  "job": {
    "setting": {
      "speed": {
        "channel": 1
      },
      "errorLimit": {
        "record": 0,
        "percentage": 0.02
      }
    },
    "content": [
      {
        "reader": {
          "name": "mysqlreader",
          "parameter": {
            "username": "yRjwDFuoPKlqya9h9H2Amg==",
            "password": "XCYVpFosvZBBWobFzmLWvA==",
            "column": [
              "`category_id`",
              "`category_name`",
              "`parent_id`",
              "`level`",
              "`is_leaf`",
              "`sort_order`",
              "`icon_url`",
              "`description`",
              "`status`",
              "`create_time`",
              "`update_time`",
              "`dw_create_time`",
              "`dw_update_time`"
            ],
            "where": "1=1",
            "splitPk": "",
            "connection": [
              {
                "table": [
                  "me_category_info"
                ],
                "jdbcUrl": [
                  "jdbc:mysql://node101:3306/jtp_dingdong"
                ]
              }
            ]
          }
        },
        "writer": {
          "name": "hdfswriter",
          "parameter": {
            "defaultFS": "hdfs://node101:8020",
            "fileType": "orc",
            "path": "/user/hive/warehouse/jtp_dingdong/me_category_info/dt=${data_date}",
            "fileName": "me_category_info",
            "writeMode": "truncate",
            "fieldDelimiter": ",",
            "column": [
              {
                "name": "category_id",
                "type": "string"
              },
              {
                "name": "category_name",
                "type": "string"
              },
              {
                "name": "parent_id",
                "type": "string"
              },
              {
                "name": "level",
                "type": "int"
              },
              {
                "name": "is_leaf",
                "type": "int"
              },
              {
                "name": "sort_order",
                "type": "int"
              },
              {
                "name": "icon_url",
                "type": "string"
              },
              {
                "name": "description",
                "type": "string"
              },
              {
                "name": "status",
                "type": "tinyint"
              },
              {
                "name": "create_time",
                "type": "string"
              },
              {
                "name": "update_time",
                "type": "string"
              },
              {
                "name": "dw_create_time",
                "type": "string"
              },
              {
                "name": "dw_update_time",
                "type": "string"
              }
            ]
          }
        }
      }
    ]
  }
}